//1 引入连接数据库的工具类
let mongoose = require('../util/dbUtile')
// 2 创建数据结构（用户的）
let commoditySchema = mongoose.Schema({
    name: String, 
    intro:String,
    inventory:Number,
    image:String,
    price:Number,
    type:String,
    typeId:String,//类型ID
    status:String//饮料/食品？
});
//3 创建数据的模型
let commodityModel = mongoose.model('commodityModel', commoditySchema, "commodity");

//4 导出用户模型(***)
module.exports = commodityModel